#ifndef BLOCKPROPERTY_H
#define BLOCKPROPERTY_H
#include <QDialog>
#include "node.h"
#include "ui_blockProperty.h"
#include "cdfpropertyfield.h"
#include "blockproperty.h"
#include "depproperty.h"
#include <QtDebug>
#include "designer.h"

#include<QSignalMapper>

class designer;
class cdfpropertyfield;

class blockproperty : public QDialog, public Ui::Form
{
    Q_OBJECT

public:
    //blockproperty(QWidget *parent = 0);
    //blockproperty(node *);
    blockproperty(node *block1, designer *d, QWidget *parent = 0);
    void setBlock1(node* block1);
    node* block1();



private:
    designer *mydesigner;
    node * myblock1;
    dep* cdfPropertyDep;//dep associata al cdfPropertyfield
    QSignalMapper *signalMapper;

signals:
    void clicked(const QString &text);


private slots:
    void on_lineEdit_textChanged();
    void id_accept();
    void active_accept();//richiama la finestra di settaggio della cdf per lo stato active principale
    void failure_accept();//richiama la finestra di settaggio della cdf per lo stato failure principale
    void repairable(int state);

public slots:
    void dep_accept(const QString &text);//richiama la finestra depproperty associata allo stato del nodo

};

#endif
